/*

// Customized for this use-case
const isObjectCustom = value =>
	isObject(value) &&
	!(value instanceof RegExp) &&
	!(value instanceof Error) &&
	!(value instanceof Date);


// customized for this use-case
var isObject = function (x) { return typeof x === 'object' &&
	x !== null &&
	!(x instanceof RegExp) &&
	!(x instanceof Error) &&
	!(x instanceof Date); };


*/


/**
 * 判断是否为一个对象
 * 排除了 RegExp,Error,Date等这些特殊对象
 * @param  {[type]}  x [description]
 * @return {Boolean}   [description]
 */
function isObject (x) { 
	return typeof x === 'object' &&
		x !== null &&
		!(x instanceof RegExp) &&
		!(x instanceof Error) &&
		!(x instanceof Date); 
}


console.log(isObject(new Date()))
console.log(isObject([1, 5, 0]))
console.log(isObject(null))
console.log(isObject(3))
console.log(isObject(Math))

console.log(typeof Math)


// https://www.npmjs.com/package/isobject  https://github.com/jonschlinkert/is-plain-objet  
// https://www.npmjs.com/package/is-plain-object https://github.com/jonschlinkert/isobject
// 
// 
// 